package pe.com.csi.pm.regexiv;

import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.widget.EditText;

public class TabCaracteristicas extends Activity {

	private EditText txtLongitud;
	private EditText txtAngulo;

	private EditText txtLuzE;
	private EditText txtLuzS;
	private EditText txtAlturaE;
	private EditText txtAlturaS;

	private EditText txtAlturaRellenoE;
	private EditText txtAlturaRellenoS;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tab_caracteristicas);
		txtLongitud = (EditText) findViewById(R.id.txtLongitud);
		txtAngulo = (EditText) findViewById(R.id.txtAngulo);
		txtLuzE = (EditText) findViewById(R.id.txtLuzE);
		txtLuzS = (EditText) findViewById(R.id.txtLuzS);

		txtAlturaE = (EditText) findViewById(R.id.txtAlturaE);
		txtAlturaS = (EditText) findViewById(R.id.txtAlturaS);
		txtAlturaRellenoE = (EditText) findViewById(R.id.txtAlturaRellenoE);
		txtAlturaRellenoS = (EditText) findViewById(R.id.txtAlturaRellenoS);
		System.out.println("OnCreate TabCaracteristicas");
	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		System.out.println("OnPause TabCaracteristicas");
		SharedPreferences sp = getSharedPreferences("ALCANTARILLA", MODE_PRIVATE);
		sp.edit().putString("LONGITUD", txtLongitud.getText().toString()).commit();
		sp.edit().putString("ANGULO", txtAngulo.getText().toString()).commit();
		sp.edit().putString("LUZ_E", txtLuzE.getText().toString()).commit();
		sp.edit().putString("LUZ_S", txtLuzS.getText().toString()).commit();
		sp.edit().putString("ALTURA_E", txtAlturaE.getText().toString()).commit();
		sp.edit().putString("ALTURA_S", txtAlturaS.getText().toString()).commit();
		sp.edit().putString("ALTURA_RELLENO_E", txtAlturaRellenoE.getText().toString()).commit();
		sp.edit().putString("ALTURA_RELLENO_S", txtAlturaRellenoS.getText().toString()).commit();
	}

}
